//
//  ViewController.m
//  IkongWuProgram
//
//  Created by 徐益智 on 16/2/16.
//  Copyright © 2016年 Vdianjing. All rights reserved.
//

#import "UIButton+button.h"

@implementation UIButton (button)

+ (UIButton *)buttonWithFont:(CGFloat)font
                withTextColor:(UIColor *)textColor
          withBackgroundColor:(UIColor *)backgroundColor
                     withText:(NSString *)text
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    
    button.backgroundColor = backgroundColor;
    [button setTitle:text forState:UIControlStateNormal];
    [button setTitleColor:textColor forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:font];
    
    return button;
}

@end
